package models

import (
	"github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql"
)

var O orm.Ormer

func init() {
	_ = orm.RegisterDataBase(
		"default",
		"mysql",
		"root:yunshangxiaozhao@tcp(121.199.1.204:3306)/yunshangxiaozhao?charset=utf8")
	orm.RegisterModel(
		new(User),
		new(UserComment),
		new(UserCommentImg),
		new(UserCompanyBrowse),
		new(UserResumePut),
		new(UserLabel),
		new(UserPraise),
		new(UserHonor),
		new(UserStar),
		new(UserIdentity),
		new(UserResume),
		new(UserInfo),
		new(UserSelfIntroduction),
		new(UserStarCompany),
		new(UserPutAndCompanyInvite),
		new(SocialPractice),
		new(Company),
		new(CompanyDescription),
		new(CompanyAccount),
		new(CompanyJob),
		new(CompanyInterview),
		new(Live),
		new(Welfare))

	_ = orm.RunSyncdb("default", false, true)

	O = orm.NewOrm()
}
